package com.zeros.latte.util;

import android.content.res.Resources;
import android.util.DisplayMetrics;

import com.zeros.latte.apps.Latte;

/**
 * 获取屏幕宽高 on 2018/1/31.
 */

public class DimenUtil {

    public static int getScreenWidth() {
        final Resources resources = Latte.getApplicationContext().getResources();
        final DisplayMetrics dm = resources.getDisplayMetrics();
        return dm.widthPixels;
    }

    public static int getScreenHeight() {
        final Resources resources = Latte.getApplicationContext().getResources();
        final DisplayMetrics dm = resources.getDisplayMetrics();
        return dm.heightPixels;
    }

}
